Improving the documents handling