Began work on replace mode, but not complete.
Lots of comments from the AI. Some tests are not passing though