Minor refactor of Core