Added insert and update featues. And added/changed some views