Added tweaks from @Adel-E (closes #13)
Note: I've renamed the `reset` method to `clear`, since we implement ArrayAccess and `reset` may be confusing.