State pretty print
Protect State and other fixes