Simple and fast implementation of topological sorting. No dependencies. A circular graph will throw an error with circular nodes info.