Plugin code updated to include all configurable options.

Also updated some documentation in code to be easier to read.