Cleans up js and rearranges some problematic CSS