Please review my refactoring and merge into master. Have a look at the automatic class lookup for the implementations.