cleanups and documents