Changed tests from functions to classes.
Little refactoring.
Test fixtures.