More comments in the code and some shortenings