Tried to fix things

Got it to compile, but gives a Seg fault  :(  I'm a little over my head.

http://i.imgur.com/vyipobg.png