Clean up on factory util

https://issues.jboss.org/browse/AGPUSH-520