Permission fixes
Refactoring concerning reaching encoded data