(refactor) wired up collections and updated directive