Fixin up the lack of makefiles. Also your program is broken.

I made everything the way it should.