Andddd tada! Finally managed to pull it off with a little mixing up of the code that I had before. Press C to erase and flag to start
Thanks to some people to answering my questions.