Refactored image class.