Moved dfs to core