Updated to CD 1.5, minor improvements.

* Brought up to speed with CD 1.5.
* Performed code reformat on project and cleaned up main plugin file.