Implement first pass for transformation.