payment

introduces a rough structure for the payment logic
resolves the following issues: #79, #80, #81, #85, #117