Added caching of class paths
Improved image adaption