Tidy up CPD
Refactored tests
Removed checkstyle