Add unit tests for refactored API modules
Ensure application/json on library flows reqs