More cleaning up from the big refactoring