Fixed errors and created a common SDL file