Refactored class structure.