R-a-y fixes, conflicts resolved

Hi ddean-

I saw that @r-a-y's pull requests contained a couple of conflicts, so here's a version with the conflicts manually resolved. At issue is that `extension.php` was modified independently. I applied ray's changes on top of my earlier changes and git approves. :)

This should fix issue #10.

Thanks!

-David