Moved function call into assert
Moved stringify functions into new class