fix bugs in explode
update ebgp to handle switches
tidy