Turned hover creation into a function

Also removed alerts