Add more factories and unit tests
Merge changes