Fixed getConnectedComponents, implemented getCCw/oRoot