Did a lot of linting, and removed requirement for `mime` module.