Delete duplicate code in core/main

core/main namespaces contains some duplicated defs. This commit deletes them.