Updated with EMCCode suggested changes