Changing how divs are detected

Might fix point 5 of #33