Fixes bugs in the PaymentDAO and adds tests for the new methods
Added the rest of the unit tests needed for the new PaymentDAO methods,
and fixed a couple bugs.
More bugfixes and test updates