Fixed test failure and refactory to mvn project