enhan(ul):Improved logic for ul selection criteria

Initially we were taking criteria as if it has heading. Now we will be taking
criteria as if ul has a nav class or a footer class, we ignore them .can add more classes later which come horzonal and are not
good candidate for jsonifying.