adds port; fixes class functions.