Restructured tests away from examples and fixed up junit.