dfs: refine code

decrease indentation to make cleaner code
fix mkfs bug when there is no mkfs implementation
dfs: refine more code

clean code with pointer rather than index
Merge pull request #210 from prife/master

dfs: refine code