Refactored directory and controller
Refactored directory and controller