Added better comments and a tester code for the assignment.