Tidy up and CS fixes

- Renamed $_elements to $elements
- Added new line before return statements
- Returned early where possible
- Fixed usage of constant
- Removed duplicated code
- Removed unnecessary return statement in offsetSet
Added newline
Removed call to containsKey()
Merge pull request #36 from vilartoni/master

Tidy up and CS fixes