Added factory + tests.