Added rustdoc comments, exposed to_hex()