Added initial database setup and modified delete logic