Make javascript code follow code style guide