Merge functions in one file and add explanatory comments.