Refactored code and using commons.lang3
Adding pom.xml