cleaning up entry function with new shared mem savings. mac build.