Factored out configuration of ORM to its own class.