Refactor classes and allow a definable today for unit testing