Made code more OOP, now takes arguments for HTTP docroot.