Added tests framework to facilitate more structured testing.