Adding crate_type and link annotation.
Change result type for new;  adding NanoErr.
Added error handling to connect, bind.