Corrected bug in example code
Added missing example and corrected a minor bug in another