Remove nesting of classes