Move set yOffset for tools to collectTools method.
Revise use of js in some examples.