toposort-class initial commit.