Some tweaks to better handle divs