Code documentation

+ minor modifications