Comments added for all functions.