Scaling, Entanglement and Quantum Phase Transitions