Cleaned up code SOAP-1219