Progress on Rewrite

Made lots of little things better. See commits for details.