Cleanup code, get started on tests for the http stack..