Refactored the abstract classes within NodeMatrix object.

Sprinkled comments in important areas of the code.