Cleanup to better match 's API