fixes, optimizations

some fixes, some delays, made "focus" function part of toolbox.