integrate file controller and model functions with new nested folder structure