Add functionality for https. Fix ordering in adjacency matrix.