delete item from inventory

added button to inventory table to allow deletion of an item from the
inventory and database. Also did code refactoring.