Remove unreachable or otherwise redundant code