House cleaning, added some function header comments