Implemented custom channel factory.
Changed code to not require port.
Moved port lookup to its own class.