more refactoring and TDD on flix et al