Reworking client side to use angular.js