Afsin

API documentation and some API changes/fixes.