DRY code a bit.