Moved the was connected property into the port connection object for flexibility. Added another test for reconnect testing. Slight code formatting.