Done w/ inital code, but seg faults and warnings everywhere