Updates base SDK.
Updates gitignore.
Code cleanup.
Adds xcuserstate to gitignore.
Fix to handle situations where the SRT file's text encoding is ambiguous.