Add support for comment-preserving transformation

Obsoletes #2