fixed issue with the delete step, minor aesthetic code changes