Open closed principle

Opened a pull request for comments
Why is there still type switching here?  These should be it two different modules