Improved API documentation.
Updated code sample for 'emit'