Cleanup and API tweaks