refactor bracket creation/links