Add switch to enable pushState
Fix tests