First final version. Added README.md, documentation and clean uo the code a little bit.