refactor list and hash

add erase interface.