Fixing js code style errors