Added cert check option. Cleaned up source formatting.