Refactor boundary-markers to use boundaries instead of ranges