fixed MIME types
Refactoring, part I
Added more callbacks, response types, validations