Add support for comment-preserving transformation

Obsoletes #1