Dynamic and Local Typing for Mobile Ambients