Added setPort action in main class