Dealing with boundaries of block elements, etc.

Should fix #16.