Touchups and more tests.
Added: events
Added: no-empty event
Added: window.onerror
Added: escaping for tests.
Added: .template