Cleaned up some logic in calculator reloading or exiting