Put add_var functionality into mod_var function
Merge branch 'code' of github.com:kyzhai/SMURF into code