Only lock navigation in webapp mode
Add detach method and locktime function argument to events
Refactor slide function and move view variables to views