Some js code style refactoring

Ba