Completed delete fn(), added more comments, improved tests