I started adding the above two PathHelper methods but was unsure if they would be valid or if there was a better pre-existng way. In anycase the logic in this method can be generalized.