use ajaxSetup to shorten the code.
Fix months calculation.
Show category sums on a per-month basis.
Add details on security decisions.