Code cleanup

Remove dead code.
I found them by pure statistical analysis. I did not done extensive testing though.