Refactored mouseOut and mouseOver