Format code to improve reading a little bit and remove trailing spaces.