DRY up code
Improve testability by introducing a facade