add -fPIC option for building shared object
add -fPIC flag to compile strings
minor enhancements.