Add function headers
Minor comments improvements