Applied JS styleguide. Removed the unused toggleFlash.
Modified sectioning comments