Small refactoring.
Reorganized code. Added 'Document.find' method.