Added solution to #17, insane dict init earlier