move routes out of server into its own class