Moved http handler into its own class