Some changes to the rest controller. Deploys fine on localhost.