theme cleanup and file trimming