A couple more DRYed up pieces