Refactor config repository to be properly dependency injected.
#885: Forgotten checkboxes.