Fix file type inputs, refactor forms