cleaned up webserver.js a bit, moved api routes to its own file, closes #54