Fixed most of it. Variable image type support.