adds more testing and refactor of delete button render