Added a smart for-loop insertion operation. Still need to work out kinks with backspace not registering.