Initial version of completed code. Still need to complete comments and
test function.
Final checkin for peer assessment. Fixed some comments. Tested the code.