Restructured routes loading (since routes.js and director must be loaded first)