Changed for in loops to Object.keys().forEach() loops

Hi Adam,

As said on IRC, replaced the loops. Cuts the code down by like 2 lines or something :p

I think the code should work the same (BTW im not really testing my changes)

I think it should be fine haha,

Tom