fixed incorrect text_var, id_var, and value_var usage, removed unused margin variables
now uses value_var public variable