added support for other punctuation to be followed by single and double quotes
refactored hacky new section and fixed incorrect ordering of special preliminary cases