add helper functions for #1
add tests and fixed a bug when calling Vars() when path vars are nil
remove unused C header