Hopefully fixed POM (Plus minor changes to code)

Hopefully this will compile on jenkins.