Improved tests for stream readers
Simplified parseFragment() function
Improved tests