Extract core extensions into a Utils module

Fixes #2111