updated plugin for new format

- added inline documentation
- updated code
- added error checking

Signed-off-by: Christopher Ross <cross@thisismyurl.com>