using .netrc
some c++ fixes
memory fix