Move stack initialization to constructor