Added feature to remove div element if block content is empty