Fix some compiler warnings by removing dead code.