First pass through class refactor. Compiles, but still quite incomplete.