Disallow links inside links and images inside images.
Removed some unused code.