Edited the task for lab 3.
Massive refactoring of code and coding style.

1. Changed the comments;
2. Moved the includes from .c file to the header;
3. Changed the style of code;
4. Changed the names of the functions;
Minor change in the comment.
Total refactoring of the source file.

Last changes:
1. Added TODO;
2. Added some assertions;
3. Generally changed a lot of things.