change type of port from integer to string
minor fixes; mostly code style