Refactor code (missing directories)