Add missing model_gradient and utils file. Utils needs to be reorganized