Add edit view and some new js