remove statics and refactor a bit

Removing static stuff to allow multiple instances.
Intruducing HttpContext and IHttpHandler (does not compile yet) to
separate concerns and allow IoC.