Generic phantom type

Submitting PR so it is easier to review. Not necessarily ready but...