Cleaned up. Deactivation is triggered when view is replaced with another. Does not get triggered when containing window goes away.