Add comments to the code

Signed-off-by: Kiril Nesenko <nesenko@gmail.com>