Reworking some things so all filetypes can be supported