Created port.h, plus some code removal and refactoring.

Why need second http.h? It creates more chaos.