Safety Checks.
Clean up warnings and formatting.