added a clear list button and function and fixed overwriting problem.