Added event handler for setting the global properties, instead of hard coded in the newAsset function