removed trailing spaces
fixed some merge conflicts