Reformat, refactor, mavenize, update for 1.6.2