simplified API; result codes added; new sample; README updated