big refactor with some limited style changes. Mostly, keeping classes
aware of only the variables they need to know about here.
Merge pull request #5 from radkin/refactor_variable_uses

big refactor with some limited style changes. Mostly, keeping classes