fix coding standards

fix for coding standards (spacing, whitespace, etc.) as well as proper escaping/sanitizations