X-ray and HRTEM structural studies of bulk nanoporous carbon materials produced from carbides