added mime type class and more helper functions