This task is a result from the 20180111-LegacyEncoding post mortem review meeting.
During our discussions about what led to this incident, it was mentioned that the continued dependency on global variables introduced testability constraints. This task is to investigate whether there are currently any tasks/plans to refactor this, e.g. by using more injection instead.