Improved API documentation
merged changes from master