Remove variables, switch to inherits.

This commit removes all the local copies of variables in the subclasses
and simply inherits the main class in order to bring variables into the
right scope.
Merge pull request #91 from apenney/inherits

Remove variables, switch to inherits.