Unwanted function removed and some errors in example or bugs corrected.