Refactor project to maven library