Added documentation to the whole api package and refactored a few small things.
Merge pull request #4 from gyroninja/master

Added documentation to the whole api package by @gyroninja