Fixed #58 Optimize the helper "documents"