Small fixes.
Added tests.
Changed teseter to class.