First corest refactor