Minor refactor in dfs & add demos