Eliminate redundant code