Add some debug notes
Improve documentation