Near end of big refactor