Clean reimplementation to fix issue #2509

Please do not yet merge this one, it is to find the best solution
I think I just have moved the original method declaration to an interface so don't ask me why this was originally done ;)