Added a number of fixes: Tag name case-sensitivity, text escaping, opacity setting. Tweaked the test suite slightly.