Adding image preview. Fixing keypress delay issue