More comments in the code to make it more readable

Signed-off-by: Luca Clementi <luca.clementi@gmail.com>