ISPN-4045 and a bunch of other fixes

https://issues.jboss.org/browse/ISPN-4045
https://issues.jboss.org/browse/ISPN-4465
https://issues.jboss.org/browse/ISPN-4456
https://issues.jboss.org/browse/ISPN-4475
https://issues.jboss.org/browse/ISPN-4458
https://issues.jboss.org/browse/ISPN-4457
https://issues.jboss.org/browse/ISPN-4483