Port to 2.0.0.beta

A few changes to make this work on 2.0