Re-adjusted delete function, and updated database schema.