Added a bunch of filetype magic.