Worked on sockets some more. Created ConnectionManager class.