SOAP-989: cleanups
SOAP-989: refactored stuff
SOAP-989: more refactorings