Implemented and documented Plug-in API with helper functions. Also simplified the objects passed around.
Fixed a prototype mistake on the rule in the Example Plug-in