Simplify/remove code from coretypes.py