small refactoring, some new ideas, but no time to implement... maybe tomorrow?