Fixed api documentation and fixed some api