Added test figures; refactoring
Test code compiles; Added a couple of basic tests