remove lots of dead code