Cleaned up example, fixed port number not being settable