mass reformatting and cleanup of compiler warnings