submit: check for valid filetype. Small fixes.