Refractored - moved jpa and controllers to server.