Got the delete buttion fully working after a bunch of debugging.