Fixes non-matching editing boundaries, and improves comments