just some minor cleaning up; construct the endpoint-path once instead of twice, and grouping all variable declarations at the start. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>