Format changes and fixed some compiler warnings