remove legacy code
now use tapcfg everywhere
fix warnings
clean the code