Add inline docs for module implementation

fixes #1106