added Delete function, and GenerateID function.