Finished refactoring underlying sharing/permissions model