Move types to separate module

Move the Variable and VariableRequest wrapper classes, as well as some
helper functions, to a separate module