Unit testing

Implements base unit testing.