Added functions, comments, to complete Assignment 2.