Many warnings, handled them. Fixed formatting