Expanded the API documentation

The comments from the plugin source code are now more clear, and are
written to the end of the README file to make it easier to render on
Github.