refactored into more testable modules and added tests for grouping functions; started work on roadmap