history and better file cleanups