Clean up local variable usage - Remainder

Minor cleanups in a couple ofplaces:
* Config funtions
* Stackforge
* TLS

Combined a couple of smaller changesets that are loosly related

Change-Id: Ifa16f2e4c0eca0ef3401c0dfdc4f3d91809021a5
Merge "Clean up local variable usage - Remainder"