Some improvements + added a function description