multiple instances of elements can now run at the same time

 - this is done by adding a document "global" called __counter.
 - this means multiple instances of elements can run at the same time.
cleanup