Added unit tests and a poor man's test framework