Optimized some calls that could increase the stack depth unnecessarily