Adding some logging
Improved API doc