Remove dead code

Some removals might be controversial...