Try to reduce deep nesting of classes