Removed unused code; a number of fixed by Anthony Asterisk
Removed unused code; a number of fixed by Anthony Asterisk

bluerover/6lbr,arurke/contiki,arurke/contiki,arurke/contiki,MohamedSeliem/contiki,arurke/contiki,MohamedSeliem/contiki,bluerover/6lbr,arurke/contiki,bluerover/6lbr,MohamedSeliem/contiki,bluerover/6lbr,MohamedSeliem/contiki,bluerover/6lbr,MohamedSeliem/contiki,arurke/contiki,bluerover/6lbr,arurke/contiki,MohamedSeliem/contiki,bluerover/6lbr,MohamedSeliem/contiki