Added edited tabs counter and embeded logic