Implementation of a factory design pattern.