Removed unused function.
Fix a memory leak in the SVG viewer app.
More error checking for the SVG viewer app.