Using str's starts_with instead of my own mess.
Made remove_comment recursive so that it catches trailing comments.