Updated to work with SPA instead of SimpleJpa