Documentation

Write detailed comments in the code and the README.md