Cleanup and export API