Refactored SDL and ES2