rewrites, edits, and cleanups