We still write positions if either `closeTop` or `closeBottom` is `false`? Shouldn't we just have `2 * width + 2 * height` positions for the edges when they're both `false`?