Shayan/ddfs refactor