Still debugging. I am getting segmentation errors. I will continue in another branch
called debug. I will then merge debug into this branch.