Making code a bit more DRY and future-proof.