Implemented the add and edit views.