A bit of code cleanup and some small improvements in the weather_dot_json writer

Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>