refactoring code and adding single distribution changes for pom