Removed dead code

most of it seems to have been made useless in
commit 28f639d51e2974b5f36714fd733a7920c64a5421