Merge pull request #3 from gyroninja/master

Some work on events and basic documentation
Added documentation to the whole api package and refactored a few small things.