Add shared logic and pom.xml