Code cleaning up for user route