rest/md readme.
Small PEP8 fixes.
Removed unused functions.
Use some python features.