Clean up api surface
Add missing tests