Refactor in Memory and Database
Fixed permissions