Tweaks to permission collection ID, fixing files and adding some indexing