added docs and fixed variables in example scripts