Fix coding style and remove trailing spaces