Still working on debugging seg faults