externalized port and host into protected methods, added some javadocs