Fixed: several minor warnings
Changed: separate resources loading from using