Moved Variable Definition to a Function

Moved the variable definition code to a function.
defineVariable() is given a string expression which is created as a
variable.