Added implementation to remove all comments then readd them at the end, fixes matching issues within the comments.