Applied a little DRY'ness