Added CRUD functionality, bug fixes