Debugging

debugged deprecated code, upgraded SDL 1.2 to SDL 2.1