Made the submission factory smarter and added a form repository.