Still refactoring
More to do on the edit template