Refactored and improved core type managing.