SDL: code cleanup