code refactoring to have controller, pom and readme