moar extensions -> media types
added jshinting
correctly handles filetypes