cleaning up assertions and text capture in testing framework. Still some weirdness going on.