Refactor hover hook