Converted 2d AST namedtuples to real classes (refs #1)