Removing some redundant code