cleanup and pydocs