Added in cleaning for testing
Relocated prettyprint function to helper