Removing redundant code