Move resources and controllers to separate files