added back stripping of comments which had been lost when switching to regex