Gunnar & Nils: some refactoring