core: factor out 'core' classes to top-level namespace