Improved state-based location management