re-arranged the code to be more eye-friendly

also converted TAB to spaces on this one ;)
fixing bad previous merge
Merge branch '1.0.0-dev' of https://github.com/melonjs/melonJS into 1.0.0-dev