Added image validation, window resizing