Various style and warning stuff. Functionality unchanged.