Remove some redundant code