Removed need to specify Client/Server role

Connection is now a singleton, allowing more consequent access.
Added local serverport preference.
Additional error handling.