Changed a base class a little bit.
Added some tests.