Implementing a good portion of the master code.

Still have an issue with waiting for the right groupId on EOF.