added DOM Level 0 and improved performance