Removes some redundant code.