Move Zepto detection to capabilities to reduce reliance on Zepto. Fix a bug in navigation.