refactored soupcms_api functionality into document service class
refactoring