Move xpath stuff back to app_manager