fix endpoint bugs and more docs