Refactor image class slightly