Converted vars into nested

This is prep work towards sharing vars.
Merge pull request #194 from blueboxgroup/blueboxgroup/all-nested-vars

Converted vars into nested