minor refactors, PEP8 and readability. Converted readme.txt to readme.md markdown format