Fix Pear Bugs #19315 & #19176

**Preparing first Github release.** *and* **Fix all known bugs.**

- WS fixes.
- Removed dead code and fixed API usage.
- Add Test 19176
- Add Test 19315
- Fixed Pear Bug	#19315 / Issue #1
- Fixed Pear Bug	#19176 / Issue #2