some basic variable reorganiztion
Merge pull request #2194 from awesomerobot/master

some basic variable reorganiztion