Add some dependency
Improve documentation, and refactor getAdequateBuffer a bit