Moved out some events from minimized scripts