Split http handlers from rest of the code