Added tests.
Changed comments.