cleanup namespaces
Refactor ReplyToLocal(), GetClientValidationToken(), and BuildFragment() functionality.