Make code more DRY