Added checks for internal CSS and and check for valid UL child elements