Fist commit. experiment with unsafe memory for speed. changed manual topo array copies to methods. code cleaned up