Several fixes for Controls and Scripting Support

+ a bit improved Resource Manager logic