Refactor to maven