removed p function
smallish changes
numerous changes
var replacing works!
and clearing