Setting default port and removing unused code