removed redundancies and added TODOs to user.js