Fixes #240

However, I would like to do a more thorough review of file types as discussed.