Changed code structure for testability

really, when did they do that?