Refactor class design. Incomplete.