Updated state json to use hex string for id.
Fixed minor bugs