Improve scalability of Image related functions and class