Removed calls to locals()

Replaced them with explicitly enumerated the needed variables

Change-Id: If6e93dc2cdab6a1e35f91ca7a254dbae6dc8115b
Merge "Removed calls to locals()"