Clean up and doc