Make code a bit DRYer.