refactored ImageInput a little
resolving merge conflicts
nicer ImageInput