Refactor potion listener