Transform/erasure

More fixes to erasure and handling phases in general.