Updated to use our generic variable handlers.

  This updates for issue #20, removing some hardwired functions
 and replacing them with `get_variable` + `set_variable`.