Made a few changes to various files to implement further testing. Added more tests.