Refactoring number and date formatters to be properties of document, rather than shared across all elements
Adding unit tests