Some improvements



Could you please review and publish these changes.
I tried to change as little as possible.

These issues should be addressed: 4, 11, 52,65