Added basic mime-type support, updated comments