Complete most of function chapter