Updated project functions to use res_t* res