(#513) correctly add closure (again).
(#546) broke out ajax
Merge pull request #540 from daleharvey/513-closure

(#513) correctly add closure (again).