Update readme
Refactor common methods

There are several methods used by the formatter and the settings
controller. This places them in a common location.