Clean up code, and use restify instead of express