formatting and security fixes