Removed some left-in debug stuff, added some more tests to verify functionality