Started Port/Client Class and Refactor Code