Close dialogs when moving or reloading
Only merge stack qualities if merging took place
Clean up code
Clean up
Clean up
Clean up