Add some SDL stuff
fixed up some stack issues