Added testing framework and tests.