Fixed toString test.
Fixed small programming style errors.