Completed first attempt to add new text including an optional comment and also refactored a little bit