Added a few comments on how the methods work