cleaned up SDL interface