Refactor invalidation.
Fix inter-frame navigation.