Begin porting to SDL2.0
Some fixes