Save state functionality

:facepunch: