Clarification of the purpose of a function and bug fixing.