Server and client threads etcetera added
fixed merge conflicts