Mavenize, general code clean up

Says what's on the tin.