Cleanup of some dead code