Tidy up trailing spaces, fix trailing newlines, add alt properties to images