Remove dependency on rework

Inlines small utility function from rework. See #1