Converted 2d AST namedtuples to real classes