Refactor assessment and workflow APIs
Moved workflow errors into a separate module.