Fixing ordering of writeRef.
Fixing MVars (tests included)
Adding a counter to the output (lets you see how many tests were done)