Refactor to use maven to manage the dependencies