Refactor: remove dup code.

Delete Refscontroller#define_tree_vars, because it is same with
assign_ref_vars.
Add filter ref check box