Introduced EntityManagerFactoryProvider.java and fixed the devices bug