Better docs and comments