Cleanup and better docs.