Moved random to a service and created stubs for various factories