Moved EntityManagerFactory to engine and made it static final