some warning fixes and general sdl optimization
Merge branch 'RicTemplateBranch'