adjust variable definition and add delete_vertex function.
adjust code structure & add delete buffers.