[FOLD] Address issues that cropped up during review and testing:
* Ensure that partially consumed offers are placed at the right quality.
* Move functions out of headers and improve comments.
[FOLD] work in progress offer tests