Changed SDL binding
Refactor and improvements