FEAT: factorized stack management FEAT: other minor code improvements
FEAT: factorized stack management
FEAT: other minor code improvements

iArnold/red,NikolayShubenkovProgSchool/red,vehar/red,rheber/red,red-eco/red,NikolayShubenkovProgSchool/red,rheber/red,red-eco/red,vehar/red,iArnold/red