Use List instead of Stack (deprecation warning).