Updated W3C tests and bug-fixes