Revamp push/register with JSON/XML support.