cleanup and add port as param in tests