Numerous formatting changes and warning cleanup