Cleaned up Connection a bit, made all the methods into functions so that the Connection class serves only as a thin layer of abstraction over normal socket creation. Added a test case, and made the receive method recursive again (it cause issues with messages sent right after the other)