Added edit policy functions and sorted some errors