Updated to be compliant with PSR-4

Also fixed the call of a deprecated method (key_exists)
Merge pull request #1 from tisogawa/master

Updated to be compliant with PSR-4