Rewriting class to build server sockets from factory.
Updating tests to use HashMap and not Map.