js refactoring / disable main