fixed the text rendering function; now it only renders updates

The common.Vector stucture had a broken diff function that would return the
difference of two vectors, but it had a typo that made it return a diff
of the indices of the two vectors.

Some other random syntax/minor bugs fixes.