Refactored _compute_gmf