Refactors output modules to be more OO

Allows each output module to have different configs
Allows the BASE_URL to be overridden by an HTTP header