[TEST][CLEANUP] - Refactored to split out related functionality into more cohesive classes, added unit tests, checkstyles