New server

Multiple improvement on the server side code.
This was pretty old, this is now a bit better. 
Still room for a bit less repetition on the routes.