Cleaned up code, getting ready for patch. Ready to find out what I broke while find-replacing.