String bugfix. Cleanup, more error handling, ignores DOCTYPE now, parses attributes (but doesn't store them yet).