coding standard fixes

Fixes for coding standards (spacing, whitespace, etc.) as well as escaping/sanitization fixes.
Merge pull request #5 from jkudish/patch-4

coding standard fixes