clean up redundant code