Remove whitespaces from the end of lines
Cosmetics changes: spaces, string formatting, is None instead od == None