Refactoring also fakes and adding helpers.