Finished debug program, making it compilable (seg faults when run)