Added a templated abstract factory class, because why not?