Working import hooks

See ep_mammoth for an implementation