continuing core refactor, project builds but segfaults