Done some refactoring ...