model clean up, has_many relationships introduced and prediction_id passed to result