Middle of refactoring. This has compilation errors.