Payment Protocol: Added tests and misc formatting