Comment-update.
Attempt to be stricter about parsing.
Updated header + tightened regexps.
Added comments; removed debugging prints