The effect of gas removal on the dynamical evolution of young stellar clusters