Added in-class documentation and assert checks