Changed perm for every file. Added templates