Some DRY fixes