added range, and fixed a load of touch bugs.