Adds a SDL example + code cleanup