Cleanup and api updates