Added add and update functions for inventory list view controller