Fix trailing spaces & formatting issues