[do-not-merge] Improve separation of concerns for API