remove drawSwitch, multi tree in 1 function
reduce global variable
add notes and simplify
optimise