small refactor of api and santize service objects. thank you avdi.