cleanup and better docs