clean up and doc