Reindent composer.json.
Add unit tests for factory.