Add functions file. Update comments.