optimization: replaced more classes with named tuples