Made events table local
Wrapped API functions to a local table
Camel-case style for functions names
Updated code example
Merge pull request #1 from Yonaba/master

Local vs Global, naming conventions