move json decode wrappings to utils
Add state.pkg
clean up state package creation
clean up and add test=True capability to state.pkg