Added JSON Controller and made endpoint use unique keys for the view functions