Format code, organize imports, and improve consistency of code