Implemented 'sendfile' and 'download'
Added some types and aliases to make signatures clearer