Refactor a few things
Fix a bug in FileList