[#81] guess_db_nrow -> db_nrow
[#77] Fix warning when i has multiple variables
[#81] Remove curr_var_tab
[#81] Minor fixes