Using better example for if statement, removing unused user.js