ISPN-5032: Some cleanup and memory consumption improvements


https://issues.jboss.org/browse/ISPN-5032