Some cleaning of dead code