Adding docstring.

Adding instructions into docstring for resolving exercices.
Moving main functions into tests functions.

Need to be build with
```
rustc --test my_file.rs
```
Test it with:
```
./my_file
```