Remove code using stack class