Clean up redundant code