Fixed a lot of errors but still not working. Pushing so I can pull on kepler and use gdb