Latest bugfixes

Mostly minor bugfixes, but also there was a problem with the main pom.xml which needs to go back into the main repo