Payment Protocol: Added tests and misc formatting
Merge pull request #783 from braydonf/tests/paymentprotocol

Payment Protocol: Added tests and misc formatting. Closes #697