Removed unused variables from image libraries.
Clang compatibility fixes.