Beginning some major refactoring.