code and test rewrite
edited README
Merge pull request #1 from cybermerc/master

fixing some tests