Cleanup and doc