Fixing JS formatting issues