Updated removeInlineComments and removeBlockComments with new code

Implemented your code for both functions, and fix a couple of bugs.