Improve stack-functions