Refactor Image class