Fixed model edit bug, more template inheiritance