Moved resource viewer events to the global constants variable