1.Every thing written in index.html is not a good way. Component.js will be automatically loading from the ui5 run time.
2. jQuery.sap.declare("sap.ui.demo.myFiori.Component");
you are declaring that component and you can use other things, variables declared in component in your view's and controllers.
Please go through this tutorial - OpenUI5 SDK - Demo Kit