Refactored code into a maven build