Faster implementation of the 'realization_order' function based on DFS topological sort
Added loop detection & style corrections
Merge branch 'white-pony-schedule-dfs'