Fix compilation and remove trailing whitespaces