Optimized class structure. Comments added to indicate expected functionality