Refactorisation. Modular and testable app