Refactor class representation of the vm image.