Bug fixes and removal of space check

* Removed check for extra spaces since this is pointless in latex files
And also error prone
* Fixed bug in space after punctuation detection replacement
function.