Add dump method and fix types in get_var