SDL: Cleaning up some code