Rename 'id_table' to 'vars', group helper functions into Util class (fun with lambdas)