Added some reference caching for some stack routines