Wrote all code without testing any of it and compiled without errors. Seg fault when running. Currently crying.