another wave of refactoring ...

this should be a much more stable version ...