fix some warnings provided by linux gcc 4.6.2
fixes to examples and api for *methods* and warnings
added const to api string parameters to avoid warnings