Some changes in directory_controller.js