Quick fix delete - removed "deleting after filtering" bug

There was a problem with using $index as the index to splice from. When filtering, the $index would not change, but the index would (kind of confusing terminology) so clicking delete would sometimes delete the wrong plant. Switched to indexOf and problem was solved.