Refactor the dir structure