Implemented basic add and edit