Refactoring to be more object oriented

Noticing that I was repeating a lot of my code, I decided to refactor
everything to be more object oriented.

Also started work on the not yet functioning http_parser