Added test cases. PEP8 fixes. Updated README.