Fix for \ at end of comment, and add tests