protractor node refactoring