added prepublish script
added simple restructuring of state object