Throw proper exception for missing required data
Improved error-handling
Make sure we only find the expected fragments
Fixed bug in the javascript