Highmaps: Structured some code