changing metadata to state, pnexpires to heartbeat in url params
merging staging-3.6.0-v2