Add a lots of comments and docstrings

- Clarify the code by adding comments and docstrings.
- Ask user which test he would like to perform.
- Add some missing functions and correct others.