Remove some dupe code