More class changes and a bit of refactoring.