filled in and commented the functions provided for the assignment.
Added a test function to exercise the main class a bit