JSLinted, fixing some code