JShinting and reordering some code.