Refactor scalar formatter

Removed some of its own logic in favor of extending NormalizerFormatter to
benefit from shared logic.