Working on the edit data function, untested

Cant test because cant get past weird error loading page issue