Revamp push/unregister with JSON/XML support.