bug fixes / improved examples.php to test baseline functionality