REST Refactor + EJB fixes