Mistakes corrected, project mavenized, junit test added