Completed functions and comments for assignment.