More helper functions. Pretty printing of the state