Updated app to use resource instead of $http