* refactoring code for babel-generator package * removing spaces and refactoring if statement * fixing warnings