Fix broken test and remove dead code.