Removing dupe code