Adding docs and comments