added more input, protection from input bugs, and a save image button