homogenizing http handlers by inheriting from a common base class
making a few more loop variables const