use end() instead of count()-1
use method_exists instead of reflectionClass
correct classnames in readme.md