Fixed comment bug.
Trim excess whitespace from log messages. Minor change to log output.
Got rid of redundant check for empty msg POST parameter.
Put the check for empty msg back in. The previous commit was faulty.
Added comments to methods.