Client side javascript conforms to jslint
Fixed problems with pos