Renamed createUser method to register, for consistency
Separated model and routing logic.
Remove type
Added basic testing with Mocha