New refactoring of pom.xml files

Rebased previous PR, # #139 can be deleted