before and after conscruct event listeners may be defined only inside document
implement deleting document by calling document's method
add tests for document's events