Applications of Entanglement and Nonlocality