Increase version number to 1.3.1
Format plugin file

Ran file through PHP Tidy to increase readability. Used Allman (BSD)
style to normalize indentation and clean up spacing.
Format plugin whitespace, operators

Manually formatted whitespace, operators, and control structures to be
consistent throughout the plugin.