Added framework for testing, and some tests