Revert "Move aloha cleanup code to onClose method."

This reverts commit 85f04a05726989e4b4967da815c7bc67661fab1f.
Merge pull request #143 from oerpub/63207788-fix-images-tables

fix Existing images and tables