Fix error and reduce amount of code

Fixed error when toggling overlay for Arena or Boss frames.
Moved all unit code into core and reduced the amount of code needed