Some improvements

Could you please review and publish these changes.
I tried to change as little as possible.