Added testing code

Tests are as of yet unfinished.