Fixing JavaScript formatting