Refactoring the UGHO app