Ongoing refactoring of tests and app part2