Bug fixes, adapting to new hd records, and some pep8

Signed-off-by: Adam Dybbroe <adam.dybbroe@smhi.se>