phpdoc fixups, unused var and comment spelling

I've tidied up the phpdoc blocks so my editor show errors when using the library.  I've also removed an unused variable.