Fix whitespaces

* Remove trailing whitespaces
* Add newline at end of files
Use G++ as compiler