Removed lots of mutable state, added 2 extra extensions

Hey, just a couple more changes. I removed a bunch of mutable state and replaced it with a functional equivalent (theoretically increasing thread-safety, though it doesn't matter for the current app) and added .COM and .jpg.exe file extensions.