Refactor point barriers code