Change to new interface. Fix import errors.