added more library functions. added better support for using c++ libraries.