Cleans up some redundant code.