- OptExtensions.flatten now preserves errors
- updated tests