Rework API design